package com.bestbuy.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * @author ThanhNgo
 * 
 */
@Entity
@Table(name = "account_info")
public class AccountInfo implements Serializable {

	@Id
	@Column(name = "IDACCOUNT_INFO")
	@GeneratedValue(generator="gen")
	@GenericGenerator(name="gen", strategy="foreign", parameters=@Parameter(name="property", value="account"))
	private Integer idaccountInfo;

	@OneToOne
	@PrimaryKeyJoinColumn
	private Account account;

	@Column(name = "FULLNAME")
	private String fullname;

	@Column(name = "BIRTHDAY")
	private String birthday;

	@Column(name = "SEX")
	private String sex;

	@Column(name = "ADDRESS")
	private String address;

	@Column(name = "EMAIL")
	private String email;

	@Column(name = "PHONE")
	private String phone;
	
	@Column(name = "LINKFACEBOOK")
	private String linkFacebook;
	
	
	
	/**
	 * @return the linkFacebook
	 */
	public String getLinkFacebook() {
		return linkFacebook;
	}

	/**
	 * @param linkFacebook the linkFacebook to set
	 */
	public void setLinkFacebook(String linkFacebook) {
		this.linkFacebook = linkFacebook;
	}

	public Integer getIdaccountInfo() {
		return idaccountInfo;
	}

	public void setIdaccountInfo(Integer idaccountInfo) {
		this.idaccountInfo = idaccountInfo;
	}

	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	

	public String getFullname() {
		return fullname;
	}

	public void setFullname(String fullname) {
		this.fullname = fullname;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	
	public AccountInfo() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * @param idaccountInfo
	 * @param account
	 * @param fullname
	 * @param birthday
	 * @param sex
	 * @param address
	 * @param email
	 * @param phone
	 * @param linkFacebook
	 */
	public AccountInfo(Integer idaccountInfo, Account account, String fullname,
			String birthday, String sex, String address, String email,
			String phone, String linkFacebook) {
		super();
		this.idaccountInfo = idaccountInfo;
		this.account = account;
		this.fullname = fullname;
		this.birthday = birthday;
		this.sex = sex;
		this.address = address;
		this.email = email;
		this.phone = phone;
		this.linkFacebook = linkFacebook;
	}

	
}
